$(document).ready(function(){

	
	 
	$("#searchAtn").click(function() {
		
		var param="board_type="+$("#board_type").val();
		    param+="&board_cd="+$("#board_cd").val();
		    param+="&searchfl="+$("#searchfl").val();
		    param+="&searchct="+$("#searchct").val();
		    param+="&cpage="+$("cpage").val();
		    param+="&totalPage="+$("#totalPage").val();
		    
		    
		 
	    $('form').attr("action",contextPath+"/admin/artlist.do?"+param); //a
		$('form').attr("method","get"); 
		$('form').submit();	
	});

    $("#searchaBtn").click(function() {
		
		var param="board_type="+$("#board_type").val();
		    param+="&board_cd="+$("#board_cd").val();
		    param+="&searchfl="+$("#searchfl").val();
		    param+="&searchct="+$("#searchct").val();
		    param+="&cpage="+$("cpage").val();
		    param+="&totalPage="+$("#totalPage").val();
		    
		    
		 
	    $('form').attr("action",contextPath+"/admin/boardlist.do?"+param); //a
		$('form').attr("method","get"); 
		$('form').submit();	
	});

	
});







function checkSubmit( frm )
{
	
		
		return true;
	
	
}



function delSubmit( )
{	
	
	  $('frm').attr("action",contextPath+"/admin/upartdel"); //action ��옙占썲�占썹�占쎌���옙
	  $('frm').attr("method","POST"); 
	  $('frm').submit();	
}

function search()
{	
	
	  $('frm').attr("action",contextPath+"/admin/artlist"); //action ��옙占썲�占썹�占쎌���옙
	  $('frm').attr("method","get"); 
	  $('frm').submit();	
}


function numkeyCheck(e) {
    var keyValue = event.keyCode;

    if( ((keyValue >= 48) && (keyValue <= 57)) ){
    	
    	//alert("占썬�占쏙�占쏙옙占쏙옙占쎈�竊�옙紐�옙");
    	  $("#board_cd").val();
    } 
    
}

function postpopup(){
	new daum.Postcode({
	    oncomplete: function(data) {
	        /* 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분. */
	        console.log(data);
	        $("#postcode1").val(data.postcode1);
	        $("#postcode2").val(data.postcode2);
	        $("#address1").val(data.address1);
	        $("#address2").val(data.address2);
	     
	    }
	}).open();
}